﻿// Decompiled with JetBrains decompiler
// Type: UnityEngine.ResourcesAPIInternal
// Assembly: UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E6AE6B5A-2752-4B07-9528-C8B77C62CE79
// Assembly location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll
// XML documentation location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.xml

using System.Runtime.CompilerServices;
using UnityEngine.Bindings;
using UnityEngineInternal;

#nullable disable
namespace UnityEngine
{
  [NativeHeader("Runtime/Misc/ResourceManagerUtility.h")]
  [NativeHeader("Runtime/Export/Resources/Resources.bindings.h")]
  internal static class ResourcesAPIInternal
  {
    [FreeFunction("Resources_Bindings::FindObjectsOfTypeAll")]
    [TypeInferenceRule(TypeInferenceRules.ArrayOfTypeReferencedByFirstArgument)]
    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern Object[] FindObjectsOfTypeAll(System.Type type);

    [FreeFunction("GetShaderNameRegistry().FindShader")]
    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern Shader FindShaderByName(string name);

    [TypeInferenceRule(TypeInferenceRules.TypeReferencedBySecondArgument)]
    [FreeFunction("Resources_Bindings::Load")]
    [NativeThrows]
    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern Object Load(string path, [NotNull("ArgumentNullException")] System.Type systemTypeInstance);

    [NativeThrows]
    [FreeFunction("Resources_Bindings::LoadAll")]
    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern Object[] LoadAll([NotNull("ArgumentNullException")] string path, [NotNull("ArgumentNullException")] System.Type systemTypeInstance);

    [FreeFunction("Resources_Bindings::GetAllPaths")]
    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern string[] GetAllPaths([NotNull("ArgumentNullException")] string path);

    [FreeFunction("Resources_Bindings::LoadAsyncInternal")]
    [MethodImpl(MethodImplOptions.InternalCall)]
    internal static extern ResourceRequest LoadAsyncInternal(string path, System.Type type);

    [FreeFunction("Scripting::UnloadAssetFromScripting")]
    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern void UnloadAsset(Object assetToUnload);
  }
}
